﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Globalization;

namespace MobileOSMLib
{
    public class OsmUrlBuilder : MapUrlBuilder
    {
        /// <summary>
        /// The resulting url
        /// </summary>
        public string MapUrl
        {
            get
            {
                return String.Format(CultureInfo.InvariantCulture,
                    "http://tile.openstreetmap.org/{0}/{1}/{2}.png",
                    _zoomLevel, _coordinate.X, _coordinate.Y );


                //"http://tile.openstreetmap.org/" + zoom + "/" + tx + "/" + ty + ".png"
            }
        }

        /// <summary>
        ///  Default string representation
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            return MapUrl;
        }
    }
}
